package com.itheima.service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.itheima.dao.EstimateDao;
import com.itheima.dao.PhysiqueDao;
import com.itheima.dao.PsychologyDao;
import com.itheima.domain.Assessment;
import com.itheima.service.AssessmentService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;
@Service
public class AssessmentServiceImpl implements AssessmentService {
    @Autowired
    private EstimateDao estimateDao;
    @Autowired
    private PhysiqueDao physiqueDao;
    @Autowired
    private PsychologyDao psychologyDao;
    @Override
    //风险评估 查询全部
    public List<Assessment> EstimateFindAll() {
        return estimateDao.EstimateFindAll();
    }
    //风险评估 根据姓名/手机号/档案号查询
    @Override
    public List<Assessment> EstimateConditionFindAll() {
        return estimateDao.EstimateConditionFindAll();
    }
    //风险评估 删除
    @Override
    public void deleteEstimate(Assessment assessment) {
        estimateDao.deleteEstimate(assessment);
    }



    //体质测评查询 查询全部
    @Override
    public List<Assessment> PhysiqueFindAll() {
        return physiqueDao.PhysiqueFindAll();
    }
    //体质测评查询 根据姓名/档案号查询
    @Override
    public List<Assessment> PhysiqueConditionFindAll() {
        return physiqueDao.PhysiqueConditionFindAll();
    }
    //体质测评查询 删除
    @Override
    public void deletePhysique(Assessment assessment) {
        physiqueDao.deletePhysique(assessment);
    }




    //心理测评查询 查询全部
    @Override
    public List<Assessment> PsychologyFindAll() {
        return psychologyDao.PsychologyFindAll();
    }
    //心理测评查询 根据姓名/档案号查询
    @Override
    public List<Assessment> PsychologyConditionFindAll() {
        return psychologyDao.PsychologyConditionFindAll();
    }
    //心理测评查询 删除
    @Override
    public void deletePsychology(Assessment assessment) {
        psychologyDao.deletePsychology(assessment);
    }
}
